package com.thx.common.orm.model;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;


/**
 * 属性实体.
 * 
 * @author calonlan
 */
@Entity
@Table(name = "e_property")
public class Property implements Serializable {
  private static final long serialVersionUID = 1647114762558128669L;

  @Id
  @GeneratedValue(generator = "generator")
  @GenericGenerator(name = "generator", strategy = "uuid")
  private String id;

  private String name;
  private String aliasName;// --别名
  private String dataType;// 数据类型 int|float|date|string
  private String state;// 启用|未启用
  private String isShow;
  private String isEdit;
  private String isNeed;// --是否是必填字段
  private String entityClass;
  private String entityTable;
  private String templateId;
  private String showType;// --显示类型：select|checkbox|radio|date|textarea|input-data|input-text
  private String showValue;// --显示的值
  private Integer seqNum;// --排序
  @Transient
  private PropertyVal propertyVal;
  @Transient
  private Template template;// 模板
  @Transient
  private String showTypeStr;
  @Transient
  private String dataTypeStr;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }


  public String getIsShow() {
    return isShow;
  }

  public void setIsShow(String isShow) {
    this.isShow = isShow;
  }

  public String getIsEdit() {
    return isEdit;
  }

  public void setIsEdit(String isEdit) {
    this.isEdit = isEdit;
  }

  public void setIsNeed(String isNeed) {
    this.isNeed = isNeed;
  }

  public String getEntityClass() {
    return entityClass;
  }

  public void setEntityClass(String entityClass) {
    this.entityClass = entityClass;
  }

  public String getEntityTable() {
    return entityTable;
  }

  public void setEntityTable(String entityTable) {
    this.entityTable = entityTable;
  }

  public String getTemplateId() {
    return templateId;
  }

  public void setTemplateId(String templateId) {
    this.templateId = templateId;
  }

  public PropertyVal getPropertyVal() {
    return propertyVal;
  }

  public void setPropertyVal(PropertyVal propertyVal) {
    this.propertyVal = propertyVal;
  }


  public String getAliasName() {
    return aliasName;
  }

  public void setAliasName(String aliasName) {
    this.aliasName = aliasName;
  }

  public String getIsNeed() {
    return isNeed;
  }

  public String getShowType() {
    return showType;
  }

  public void setShowType(String showType) {
    this.showType = showType;
  }

  public String getShowValue() {
    return showValue;
  }

  public void setShowValue(String showValue) {
    this.showValue = showValue;
  }

  public String getDataType() {
    return dataType;
  }

  public void setDataType(String dataType) {
    this.dataType = dataType;
  }

  public Integer getSeqNum() {
    return seqNum;
  }

  public void setSeqNum(Integer seqNum) {
    this.seqNum = seqNum;
  }

  public Template getTemplate() {
    return template;
  }

  public void setTemplate(Template template) {
    this.template = template;
  }

  public String getShowTypeStr() {
    return showTypeStr;
  }

  public void setShowTypeStr(String showTypeStr) {
    this.showTypeStr = showTypeStr;
  }

  public String getDataTypeStr() {
    return dataTypeStr;
  }

  public void setDataTypeStr(String dataTypeStr) {
    this.dataTypeStr = dataTypeStr;
  }

}
